package demo4.demo4.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class RouterController {

    @RequestMapping("/home")
    public String index() {
        return "home";
    }

    @RequestMapping("/toLogin")
    public String toLogin() {
        return "views/login";
    }

    @RequestMapping("/level{id1}/{id2}")
    public String level1(@PathVariable("id1") int id1,@PathVariable("id2") int id2) {
        return "views/level"+id1+"/" + id2;
    }

}
